package com.car.controller;

import com.car.domain.CarFault;
import com.car.domain.CarFaultInformation;
import com.car.service.CarFaultService;
import com.car.utils.Result;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RequestMapping("fault")
@RestController
public class FaultController {

    @Autowired
    CarFaultService carFaultService;

/*    @RequestMapping("list")
    public Result list(Integer pageNum){
        PageHelper.startPage(pageNum,5);
        List<CarFault> list = carFaultService.listCarFault();
        PageInfo<CarFault> pageInfo = new PageInfo<>(list);
        return Result.success(pageInfo);
    }

    @RequestMapping("selectInformation")
    public Result selectInformation(Integer faultId){
        CarFaultInformation carFault = carFaultService.getInformation1(faultId);
        return Result.success(carFault);
    }
*/

}
